#!/usr/bin/env python
#-*-coding:utf-8-*-
from  urllib import parse
from urllib import request
import os
def fanyi(text):
    url = 'http://fanyi.baidu.com/basetrans'
   # text = input()
    data = {'query': text, 'from': 'zh', 'to': 'en'}
    data = parse.urlencode(data).encode('utf-8')
    headers = {
        'Content-Type': 'application/x-www-form-urlencoded',
        'User-Agent': 'Mozilla/5.0 (Linux; Android 4.3; Nexus 7 Build/JSS15Q) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2307.2 Mobile Safari/537.36'}
    rqe = request.Request(url=url, headers=headers, data=data)
    trans = request.urlopen(rqe).read()
    global null
    null = None
    dir = eval(trans)
    for i in dir['trans']:
        print(i['src']+"\n"+i['dst'])
def oss(paths):
    if not os.path.exists(path=paths):
        print('没有找到文件')
        return
    with open(paths,'rb') as f:
        fanyi(f.read())
        print(f.read())

if __name__=='__main__':
    fanyi(input())
    #oss(input())
